commit 5fe2f7d508fb7c869b37d47e2fb8ce346f37ec07
Author: Daniel Kolesa <daniel@octaforge.org>
Date:   Wed Mar 15 05:34:16 2023 +0100

    fix up setup.py

diff --git a/setup.py b/setup.py
index b0a8f80..800b4c1 100644
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,7 @@ class Install(_install, object):
             return
 
         real_confdir = os.path.join('/etc')
-        real_statedir = os.path.join('/lib', 'ufw')
+        real_statedir = os.path.join('/usr/lib', 'ufw')
         real_prefix = self.prefix
         if self.home != None:
             real_confdir = self.home + real_confdir
@@ -73,27 +73,27 @@ class Install(_install, object):
                     continue
                 print("Updating " + f)
                 subprocess.call(["sed",
-                                 "-i",
+                                 "-i", "",
                                  "s%#CONFIG_PREFIX#%" + real_confdir + "%g",
                                  f])
 
                 subprocess.call(["sed",
-                                 "-i",
+                                 "-i", "",
                                  "s%#STATE_PREFIX#%" + real_statedir + "%g",
                                  f])
 
                 subprocess.call(["sed",
-                                 "-i",
+                                 "-i", "",
                                  "s%#PREFIX#%" + real_prefix + "%g",
                                  f])
 
                 subprocess.call(["sed",
-                                 "-i",
+                                 "-i", "",
                                  "s%#IPTABLES_DIR#%" + iptables_dir + "%g",
                                  f])
 
                 subprocess.call(["sed",
-                                 "-i",
+                                 "-i", "",
                                  "s%#SHARE_DIR#%" + real_sharedir + "%g",
                                  f])
 
@@ -101,7 +101,7 @@ class Install(_install, object):
                    os.environ['UFW_SKIP_CHECKS'] != '':
                     print("Updating do_checks")
                     subprocess.call(["sed",
-                                     "-i",
+                                     "-i", "",
                                      "s%do_checks = True%do_checks = False%g",
                                      f])
 
@@ -113,7 +113,7 @@ class Install(_install, object):
         if self.root != None:
             prefix = self.root + real_prefix
 
-        script = os.path.join(prefix, 'sbin', 'ufw')
+        script = os.path.join(prefix, 'bin', 'ufw')
         manpage = os.path.join(prefix, 'share', 'man', 'man8', 'ufw.8')
         manpage_f = os.path.join(prefix, 'share', 'man', 'man8', \
                                  'ufw-framework.8')
@@ -124,7 +124,7 @@ class Install(_install, object):
         # update the interpreter to that of the one the user specified for setup
         print("Updating staging/ufw to use %s" % (sys.executable))
         subprocess.call(["sed",
-                         "-i",
+                         "-i", "",
                          "1s%^#.*python.*%#! /usr/bin/env " + sys.executable + "%g",
                          'staging/ufw'])
         self.copy_file('staging/ufw', script)
@@ -149,7 +149,7 @@ class Install(_install, object):
         i18ndir = os.path.join(transdir, 'messages')
         self.mkpath(i18ndir)
         if len(os.listdir('locales/mo')) == 0:
-            subprocess.call(["make", "mo"])
+            subprocess.call(["gmake", "mo"])
         self.copy_tree('locales/mo', i18ndir)
 
         # Install configuration files
@@ -204,22 +204,22 @@ class Install(_install, object):
                       init_after_hook ]:
             print("Updating " + f)
             subprocess.call(["sed",
-                             "-i",
+                             "-i", "",
                              "s%#CONFIG_PREFIX#%" + real_confdir + "%g",
                              f])
 
             subprocess.call(["sed",
-                             "-i",
+                             "-i", "",
                              "s%#PREFIX#%" + real_prefix + "%g",
                              f])
 
             subprocess.call(["sed",
-                             "-i",
+                             "-i", "",
                              "s%#STATE_PREFIX#%" + real_statedir + "%g",
                              f])
 
             subprocess.call(["sed",
-                             "-i",
+                             "-i", "",
                              "s%#VERSION#%" + ufw_version + "%g",
                              f])
 
@@ -276,15 +276,6 @@ for e in ['ip6tables', 'iptables-restore', 'ip6tables-restore']:
         print("ERROR: could not find required binary '%s'" % (e), file=sys.stderr)
         sys.exit(1)
 
-(rc, out) = cmd([iptables_exe, '-V'])
-if rc != 0:
-    raise OSError(errno.ENOENT, "Could not find version for '%s'" % \
-                  (iptables_exe))
-version = re.sub('^v', '', re.split('\s', str(out))[1])
-print("Found '%s' version '%s'" % (iptables_exe, version))
-if version < "1.4":
-    print("WARN: version '%s' has limited IPv6 support. See README for details." % (version), file=sys.stderr)
-
 setup (name='ufw',
       version=ufw_version,
       description='front-end for Linux firewalling',
